<div class="row">
  <div class="medium-6 columns hypervisor only_kvm not_firecracker not_lxc">
    <label for="TARGET">
      <span class="hypervisor only_kvm"> {{tr "Target device"}} </span>
      {{{tip (tr "Device to map image disk. If set, it will overwrite the default device mapping.")}}}
    </label>
    <input type="text" wizard_field="TARGET" id="TARGET" name="target" placeholder="sdc"/>
  </div>
  <div class="medium-6 columns hypervisor only_kvm">
    <label for="READONLY">
      {{tr "Read-only"}}
    </label>
    <select wizard_field="READONLY" id="READONLY" name="READONLY">
      <option value=""></option>
      <option value="yes">{{tr "yes"}}</option>
      <option value="no">{{tr "no"}}</option>
    </select>
  </div>
  <div class="medium-6 columns hypervisor only_kvm not_lxc not_firecracker">
    <label>
      {{tr "BUS"}}
      <select id="disk_dev_prefix" name="disk_dev_prefix">
        <option value="" selected="selected"></option>
        <option value="vd">Virtio</option>
        <option value="sd">SCSI/SATA</option>
        <option value="hd">Parallel ATA (IDE)</option>
        <option value="custom">custom</option>
      </select>
    </label>
    <div>
      <input type="text" id="custom_disk_dev_prefix" name="custom_disk_dev_prefix" />
    </div>
  </div>
  <div class="medium-6 columns hypervisor only_vcenter not_firecracker">
    <label for="vcenter_adapter_type">
      {{tr "Bus adapter controller"}}
    </label>
    <select wizard_field="VCENTER_ADAPTER_TYPE" name="vcenter_adapter_type" id="vcenter_adapter_type">
      <option value="" selected="selected"></option>
      <option value="lsiLogic">lsiLogic</option>
      <option value="ide">ide</option>
      <option value="busLogic">busLogic</option>
      <option value="custom">custom</option>
    </select>
  </div>
  <div class="medium-6 columns only_vcenter not_firecracker">
    <label for="vcenter_disk_type">
      {{tr "Disk provisioning type"}}
    </label>
    <select wizard_field="VCENTER_DISK_TYPE" name="vcenter_disk_type" id="vcenter_disk_type">
      <option value="" selected="selected"></option>
      <option value="thin">Thin</option>
      <option value="thick">Thick</option>
      <option value="eagerZeroedThick">Eager Zeroed Thick</option>
      <option value="custom">custom</option>
    </select>
  </div>
</div>
<div class="row vm_param">
  <div class="medium-6 columns hypervisor not_vcenter not_firecracker">
    <label for="CACHE">
      {{tr "Cache"}}
    </label>
    <select wizard_field="CACHE" id="CACHE" name="CACHE">
      <option value=""></option>
      <option value="default">default</option>
      <option value="none">none</option>
      <option value="writethrough">writethrough</option>
      <option value="writeback">writeback</option>
      <option value="directsync">directsync</option>
      <option value="unsafe">unsafe</option>
    </select>
  </div>
  <div class="medium-6 columns hypervisor only_kvm not_lxc not_firecracker">
    <label for="IO">
      {{tr "IO policy"}}
    </label>
    <select wizard_field="IO" id="IO" name="IO">
      <option value=""></option>
      <option value="threads">threads</option>
      <option value="native">native</option>
      <option value="io_uring">io_uring</option>
    </select>
  </div>
  <div class="medium-6 columns hypervisor only_kvm not_lxc not_firecracker">
    <label for="DISCARD">
      {{tr "Discard"}}
    </label>
    <select wizard_field="DISCARD" id="DISCARD" name="DISCARD">
      <option value=""></option>
      <option value="ignore">{{tr "ignore"}}</option>
      <option value="unmap">{{tr "unmap"}}</option>
    </select>
  </div>
  {{#unless volatile}}
  <div class="medium-6 columns hypervisor not_vcenter not_firecracker">
    <label for="SIZE">
      {{tr "Size on instantiate"}}
      {{{tip (tr "The size of the disk will be modified to match this size when the template is instantiated")}}}
    </label>
    <div class="input-group mb_input_wrapper">
      <div class="input-group-field">
        <input type="number" wizard_field="SIZE" name="SIZE" id="SIZE" />
      </div>
      <div class="input-group-button">
        <select class="mb_input_unit">
          <option value="MB">{{tr "MB"}}</option>
          <option value="GB" selected>{{tr "GB"}}</option>
          <option value="TB">{{tr "TB"}}</option>
        </select>
      </div>
    </div>
  </div>
  {{/unless}}
</div>
<fieldset class="not_firecracker not_lxc">
  <legend>{{tr "Throttling (Bytes/s)"}}</legend>
  <div class="row vm_param">
    <div class="medium-4 columns hypervisor only_kvm">
      <fieldset>
        <legend>{{tr "Total"}}</legend>
        <label for="TOTAL_BYTES_SEC">
          {{tr "Value"}}
        </label>
        <input wizard_field="TOTAL_BYTES_SEC" type="number" min="0" id="TOTAL_BYTES_SEC" name="TOTAL_BYTES_SEC" />
        <label for="TOTAL_BYTES_SEC_MAX">
          {{tr "Maximum"}}
        </label>
        <input wizard_field="TOTAL_BYTES_SEC_MAX" type="number" min="0" id="TOTAL_BYTES_SEC_MAX" name="TOTAL_BYTES_SEC_MAX" />
        <label for="TOTAL_BYTES_SEC_MAX_LENGTH">
          {{tr "Maximum length"}}
        </label>
        <input wizard_field="TOTAL_BYTES_SEC_MAX_LENGTH" type="number" min="0" id="TOTAL_BYTES_SEC_MAX_LENGTH" name="TOTAL_BYTES_SEC_MAX_LENGTH" />
      </fieldset>
    </div>
    <div class="medium-4 columns hypervisor only_kvm">
      <fieldset>
        <legend>{{tr "Read"}}</legend>
        <label for="READ_BYTES_SEC">
          {{tr "Value"}}
        </label>
        <input wizard_field="READ_BYTES_SEC" type="number" min="0" id="READ_BYTES_SEC" name="READ_BYTES_SEC" />
        <label for="READ_BYTES_SEC_MAX">
          {{tr "Maximum"}}
        </label>
        <input wizard_field="READ_BYTES_SEC_MAX" type="number" min="0" id="READ_BYTES_SEC_MAX" name="READ_BYTES_SEC_MAX" />
        <label for="READ_BYTES_SEC_MAX_LENGTH">
          {{tr "Maximum length"}}
        </label>
        <input wizard_field="READ_BYTES_SEC_MAX_LENGTH" type="number" min="0" id="READ_BYTES_SEC_MAX_LENGTH" name="READ_BYTES_SEC_MAX_LENGTH" />
      </fieldset>
    </div>
    <div class="medium-4 columns hypervisor only_kvm">
      <fieldset>
        <legend>{{tr "Write"}}</legend>
        <label for="WRITE_BYTES_SEC">
          {{tr "Value"}}
        </label>
        <input wizard_field="WRITE_BYTES_SEC" type="number" min="0" id="WRITE_BYTES_SEC" name="WRITE_BYTES_SEC" />
        <label for="WRITE_BYTES_SEC_MAX">
          {{tr "Maximum"}}
        </label>
        <input wizard_field="WRITE_BYTES_SEC_MAX" type="number" min="0" id="WRITE_BYTES_SEC_MAX" name="WRITE_BYTES_SEC_MAX" />
        <label for="WRITE_BYTES_SEC_MAX_LENGTH">
          {{tr "Maximum length"}}
        </label>
        <input wizard_field="WRITE_BYTES_SEC_MAX_LENGTH" type="number" min="0" id="WRITE_BYTES_SEC_MAX_LENGTH" name="WRITE_BYTES_SEC_MAX_LENGTH" />
      </fieldset>
    </div>
  </div>
</fieldset>
<fieldset class="not_firecracker not_lxc">
  <legend>{{tr "Throttling (IOPS)"}}</legend>
  <div class="row vm_param">
    <div class="medium-4 columns hypervisor only_kvm">
      <fieldset>
        <legend>{{tr "Total"}}</legend>
        <label for="TOTAL_IOPS_SEC">
          {{tr "Value"}}
        </label>
        <input wizard_field="TOTAL_IOPS_SEC" type="number" min="0" id="TOTAL_IOPS_SEC" name="TOTAL_IOPS_SEC" />
        <label for="TOTAL_IOPS_SEC_MAX">
          {{tr "Maximum"}}
        </label>
        <input wizard_field="TOTAL_IOPS_SEC_MAX" type="number" min="0" id="TOTAL_IOPS_SEC_MAX" name="TOTAL_IOPS_SEC_MAX" />
        <label for="TOTAL_IOPS_SEC_MAX_LENGTH">
          {{tr "Maximum length"}}
        </label>
        <input wizard_field="TOTAL_IOPS_SEC_MAX_LENGTH" type="number" min="0" id="TOTAL_IOPS_SEC_MAX_LENGTH" name="TOTAL_IOPS_SEC_MAX_LENGTH" />
      </fieldset>
    </div>
    <div class="medium-4 columns hypervisor only_kvm">
      <fieldset>
        <legend>{{tr "Read"}}</legend>
        <label for="READ_IOPS_SEC">
          {{tr "Value"}}
        </label>
        <input wizard_field="READ_IOPS_SEC" type="number" min="0" id="READ_IOPS_SEC" name="READ_IOPS_SEC" />
        <label for="READ_IOPS_SEC_MAX">
          {{tr "Maximum"}}
        </label>
        <input wizard_field="READ_IOPS_SEC_MAX" type="number" min="0" id="READ_IOPS_SEC_MAX" name="READ_IOPS_SEC_MAX" />
        <label for="READ_IOPS_SEC_MAX_LENGTH">
          {{tr "Maximum length"}}
        </label>
        <input wizard_field="READ_IOPS_SEC_MAX_LENGTH" type="number" min="0" id="READ_IOPS_SEC_MAX_LENGTH" name="READ_IOPS_SEC_MAX_LENGTH" />
      </fieldset>
    </div>
    <div class="medium-4 columns hypervisor only_kvm">
      <fieldset>
        <legend>{{tr "Write"}}</legend>
        <label for="WRITE_IOPS_SEC">
          {{tr "Value"}}
        </label>
        <input wizard_field="WRITE_IOPS_SEC" type="number" min="0" id="WRITE_IOPS_SEC" name="WRITE_IOPS_SEC" />
        <label for="WRITE_IOPS_SEC_MAX">
          {{tr "Maximum"}}
        </label>
        <input wizard_field="WRITE_IOPS_SEC_MAX" type="number" min="0" id="WRITE_IOPS_SEC_MAX" name="WRITE_IOPS_SEC_MAX" />
        <label for="WRITE_IOPS_SEC_MAX_LENGTH">
          {{tr "Maximum length"}}
        </label>
        <input wizard_field="WRITE_IOPS_SEC_MAX_LENGTH" type="number" min="0" id="WRITE_IOPS_SEC_MAX_LENGTH" name="WRITE_IOPS_SEC_MAX_LENGTH" />
      </fieldset>
    </div>
    <div class="row" style="display: none">
      <div class="medium-6 columns">
        <label>
          {{tr "OPENNEBULA MANAGEMENT"}}
        </label>
        <input type="text" wizard_field="OPENNEBULA_MANAGED" id="OPENNEBULA_MANAGED" name="OPENNEBULA_MANAGED"/>
      </div>
    </div>
  </div>
  <div class="row vm_param">
    <div class="medium-6 columns hypervisor only_kvm">
      <fieldset>
        <legend> {{tr "IOPS Size"}}</legend>
        <label for="SIZE_IOPS_SEC">
          {{tr "Size of IOPS per second"}}
        </label>
        <input wizard_field="SIZE_IOPS_SEC" type="number" min="0" id="SIZE_IOPS_SEC" name="SIZE_IOPS_SEC" />
      </fieldset>
    </div>
  </div>
</fieldset>
<fieldset class="not_firecracker not_lxc hybrid_plus_section">
  <legend>{{tr "Edge Cluster"}}</legend>
  <div class="row vm_param">
    <div class="medium-6 columns hypervisor only_kvm">
      <fieldset>
        <label for="RECOVERY_SNAPSHOT_FREQ">
          {{tr "Snapshot Frequency in Seconds"}}
        </label>
        <input wizard_field="RECOVERY_SNAPSHOT_FREQ" type="number" min="0" id="RECOVERY_SNAPSHOT_FREQ" name="RECOVERY_SNAPSHOT_FREQ" />
      </fieldset>
    </div>
  </div>
</fieldset>
<fieldset class="not_firecracker">
  <legend>{{tr "IOTHREADS"}}</legend>
  <div class="row vm_param">
    <div class="medium-6 columns">
      <fieldset>
        <label for="IOTHREAD">
          {{tr "IOTHREAD id"}}
          {{{tip (tr "Iothread id used by this disk. Default is round robin. Can be used only if IOTHREADS > 0.  If this input is disabled please first configure IOTHREADS value on OS & CPU -> Features.")}}}
        </label>
        <input wizard_field="IOTHREAD" type="number" min="0" id="IOTHREAD" name="IOTHREAD" />
      </fieldset>
    </div>
  </div>
</fieldset>